-- GENERATED SPELL FOR [Perobas the Bloodthirster] --


function spell0_32377(pUnit, Event) --@Gnaw Bone,n/a--
pUnit:FullCastSpellOnTarget(50046,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32377', 591, 1)
end

function spell1_32377(pUnit, Event) --@Killing Rage,Self--
pUnit:FullCastSpellOnTarget(52071,pUnit)
pUnit:RegisterEvent('Sorts_32377', 6305, 1)
end

function Sorts_32377(pUnit, Event)
local choix_sorts_32377 = math.random(0, 1)
if choix_sorts_32377 == 0 then
pUnit:RegisterEvent('spell0_32377', 1, 1)
end
if choix_sorts_32377 == 1 then
pUnit:RegisterEvent('spell1_32377', 1, 1)
end
end

function mob32377_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32377', math.random(1500, 3000), 1)
end

function mob32377_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32377_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32377_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32377, 1, 'mob32377_Action')
RegisterUnitEvent(32377, 2, 'mob32377_Leave')
RegisterUnitEvent(32377, 3, 'mob32377_Kill')
RegisterUnitEvent(32377, 4, 'mob32377_Die')
